#include<stdio.h>
int main()
{
    //输入、存储
    char arr[51]="nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn";
    int i = 0;
    while(1)
    {
        scanf("%c",&arr[i]);
        if(arr[i]=='\n')
        {
            break;
        }
        i++;
    }
    //位数
    float w = 0;
    int flag = 0;
    if(arr[0]=='-')
    {
        w = i-1;
        //判断正负
        flag = 1;
    }
    else
    {
        w = i;
    }
    //2的个数
    int j = 0;
    int count = 0;
    for(j=0;j<i;j++)
    {
        if(arr[j]=='2')
        {
            count++;
        }
    }
    //判断奇偶
    int judge = 0;
    if((arr[i-1]-'0')%2==0)
    {
        judge = 1;
    }
    //计算
    float ret = 0;
    ret = count/w*100;
    if(flag)
    {
        ret*=1.5;
    }
    if(judge)
    {
        ret*=2;
    }
    printf("%.2f%%",ret);
    return 0;
}